package clusterapi

import (
	"time"
)

// Event types
const (
	EventTypeNodeJoin        = "node_join"
	EventTypeNodeLeave       = "node_leave"
	EventTypeLeaderChanged   = "leader_changed"
	EventTypeMetadataChanged = "metadata_changed"
)

// Event represents a cluster event
type Event struct {
	// Type is the type of the event
	Type string
	// NodeID is the ID of the node
	NodeID string
	// Node is the node information
	Node *NodeInfo
	// Timestamp is the time of the event
	Timestamp time.Time
	// Data is additional data for the event
	Data map[string]interface{}
}
